@model SitemapPartViewModel
<div class="row">
    <div class="col-12 form-group">
        <div class="custom-control custom-checkbox">
            <input asp-for="OverrideSitemapConfig" class="custom-control-input" />
            <label asp-for="OverrideSitemapConfig" class="custom-control-label">@T["Override sitemap configuration"]</label>
            <span class="hint">— @T["Check to override sitemap configuration."]</span>
        </div>
    </div>
    <div class="col-12 form-group">
        <div class="custom-control custom-checkbox sitemap-form-group" style="@(Model.OverrideSitemapConfig ? "" : "display: none")">
            <input asp-for="Exclude" class="custom-control-input" />
            <label asp-for="Exclude" class="custom-control-label">@T["Exclude"]</label>
            <span class="hint">— @T["Check to exclude this content item from the site map."]</span>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-xl-6 form-group sitemap-form-group" asp-validation-class-for="ChangeFrequency" style="@(Model.OverrideSitemapConfig ? "" : "display: none")">
        <label asp-for="ChangeFrequency">@T["Change Frequency"] </label>
        <select asp-for="ChangeFrequency" class="form-control" asp-items="Html.GetEnumSelectList<ChangeFrequency>()"></select>
        <span class="hint">@T["The frequency this content item is likely to change."]</span>
    </div>
</div>
<div class="row">
    <div class="col-xl-6 form-group sitemap-form-group" asp-validation-class-for="Priority" style="@(Model.OverrideSitemapConfig ? "" : "display: none")">
        <label asp-for="Priority">@T["Priority"] </label>
        <select asp-for="Priority" class="form-control">
            <option value="0">@T["0.0"]</option>
            <option value="1">@T["0.1"]</option>
            <option value="2">@T["0.2"]</option>
            <option value="3">@T["0.3"]</option>
            <option value="4">@T["0.4"]</option>
            <option value="5">@T["0.5"]</option>
            <option value="6">@T["0.6"]</option>
            <option value="7">@T["0.7"]</option>
            <option value="8">@T["0.8"]</option>
            <option value="9">@T["0.9"]</option>
            <option value="10">@T["1.0"]</option>
        </select>
        <span class="hint">@T["The default priority of these content types relative to other content on your site."]</span>
    </div>
</div>

<script at="Foot" depends-on="jquery">
    $('#@Html.IdFor(i => i.OverrideSitemapConfig)').change(function (e) {
        var checked = $(e.target).prop('checked');
        $('.sitemap-form-group').each(function () {
            checked ? $(this).show() : $(this).hide();
        });
    });
</script>
